#!/usr/bin/python
import urllib
import urllib2
import time
from threading import Thread

def yuyong(thread):
    print thread
    while True:
        url = "http://jisudai.me/jisudai/public/index.php/miaodai/test/test"

        req = urllib2.Request(url)
        # print req

        res_data = urllib2.urlopen(req)
        res = res_data.read()
        print res

for i in range(20):
    time.sleep(1)
    try:
        Thread(target = yuyong, args = ['Thread']).start()
    except Exception, e:
        print "Error:unable to start thread" 
# proc=subprocess.Popen(['php -f /Applications/XAMPP/xamppfiles/htdocs/python/phpreturn.php '+'name/1231/pwd/2323'],shell=True,stdout=subprocess.PIPE)

# response=proc.stdout.read()

# print response